<%-- 
    Document   : updaterole
    Created on : Dec 14, 2009, 4:02:35 PM
    Author     : student
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="sgt.onlinetest.hibernatedao.HibernateDAOFactory" %>
<%@page import="sgt.onlinetest.entity.Role" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Update Role</title>
    </head>
             <%
             HibernateDAOFactory factory = new HibernateDAOFactory();
            Long id = Long.parseLong(request.getParameter("id"));
             Role role = factory.getRoleDAO().getById(id);
         %>
    <body>
    <form name="form1" method="post" action="">
      <table width="452" border="1">
        <tr>
          <td colspan="2"><blockquote>
              <blockquote>
                <blockquote>
                  <p><strong>Update Role</strong></p>
                </blockquote>
              </blockquote>
          </blockquote></td>
        </tr>
        <tr>
          <td width="77"><div align="right">Role:</div></td>
          <td width="359"><label>
                  <input name="tbxrole" type="text" id="tbxrole" value="<%=role.getName()%>" size="35" />
          </label></td>
        </tr>
        <tr>
          <jsp:useBean id="msg" scope="request" class="String"/>
          
          <td colspan="2"><div>${msg}</div></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><label>
            <input type="submit" name="btnupdate" id="btnupdate" value="Update" />
            <input type="reset" name="btnreset" id="btnreset" value="Reset" />
          </label></td>
        </tr>
      </table>
        </form>
        
    </body>
</html>
